<script setup>
import { articleChannelService } from "@/api/article";
import { ref, defineModel } from "vue";

const modelValue = defineModel();

const channelList = ref([]);
const getChannelList = async () => {
  const {
    data: { data },
  } = await articleChannelService();
  channelList.value = data;
};
getChannelList();
</script>

<template>
  <el-select v-model="modelValue" style="width: 150px">
    <el-option
      v-for="item in channelList"
      :label="item.cate_name"
      :value="item.id"
      :key="item.id"
    ></el-option>
  </el-select>
</template>

<style scoped lang="scss"></style>
